1. Field of Invention
The present invention relates to the image processing technology, and more particularly to an image enhancement method using the local gain correction.
2. Related Art
Recently, the progress of the technology makes the types of multimedia become more and more diversified. As for the digital video, such as a digital photo, a digital display, a digital film or the digital video broadcasting technology, the image enhancement technology is greatly emphasized. The image processing is to make various changes of the image frames on the color, the brightness, the focal length and the like of the obtained digital image according to the functions provided by the image processing operation technology, or even to synthesize two photos through the more complicated operation procedures. For example, it is possible to quickly transform a sunshiny photo into a rainy photo according to some functions of image processing (e.g., the functions of changing of the brightness and the contrast). Alternatively, it is possible to stealthily substitute one thing for another according to two photos by way of the image processing procedures of selecting, cutting and pasting. Thus, the original look of the image may be changed. Therefore, the image processing is to change or analyze the data on the image.
As for the image processing, which needs to distinguish between the brightness of different images, the brightness distribution of the image is often used for the analysis. FIG. 1 is a Flow chart showing a conventional digital image enhancement method. Referring to FIG. 1, the operation includes the following steps in order to enhance the contrast of the image.
In step S101, the method starts.
In step S102, an input frame is acquired.
In step S103, a brightness histogram of the input frame is detected.
In step S104, a curve function is obtained according to the brightness histogram.
In step S105, the pixels of the input frame are substituted into the curve function to achieve the effect of enhancing the contrast ratio or the dynamic range of the image.
In step S106, the method ends.
FIG. 2A is a brightness histogram showing pixels of a photo with the larger brightness difference. FIG. 2B is a brightness histogram showing blue pixels of a photo with the larger brightness difference. As shown in FIGS. 2A and 2B, the brightness average of the photo is lower. In addition, as shown in FIG. 2B, the blue pixels of this photo have the extreme distribution. That is, the blue pixels of this photo have the extremely great brightness difference. When the brightness difference of one digital image is extremely great, the details of the processed photo image may disappear if only the digital image enhancement method of FIG. 1 is used.
In addition, in order to solve the above-mentioned problems, methods of enhancing the image using algorithms have been proposed. For example, the methods disclosed in [1] and [2] have to transform the image from the spatial domain to the frequency domain by way of, for example, Fast Fourier Transform (FFT) or Discrete Cosine Transform (DCT). Although the method can obtain the image with the better dynamic range, the operation needs the greater calculation load. If the method is implemented in the product, the layout area of the integrated circuit is inevitably increased. In addition, the power consumption is also increased with the increase of the calculation load.    [1] Lee, Sangkeun; Ha, Hyeong-Seok V.; Kim, Yeong-Hwa “Dynamic range compression and contrast enhancement for digital images in the compressed domain” Optical Engineering, Publication Date: February 2006, On page(s): 1-14 Vol. 45.    [2] Hau Ngo; Li Tao; Vijayan Asari “Design of an Efficient Architecture for Real-time Image Enhancement Based on a Luma-Dependent Nonlinear Approach” ITCC 2004. International Conference on Publication Date: April 2004, On page(s): 656-660 Vol. 1.